package com.arsl.client;

import java.sql.Date;

import com.arsl.client.data.Content;
import com.arsl.client.data.Edition;
import com.arsl.client.data.PageView;
import com.arsl.client.data.Paper;
import com.arsl.client.data.Section;
import com.arsl.client.data.SectionStats;
import com.arsl.client.data.Tag;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface PaperaziServiceAsync {

	void addARPage(int publicationId, int sectionId, int pageNumber,
			AsyncCallback<Integer> callback);

	void addContent(int tagId, int publisherId, String contentType,
			String title, String description, String url,
			AsyncCallback<Integer> callback);

	void addPaper(int publisherId, String name, String frequency, float height,
			float width, AsyncCallback<Integer> callback);

	void addPublication(int paperId, Date publishedDate, int editionId,
			AsyncCallback<Integer> callback);

	void addPublisher(String name, AsyncCallback<Integer> callback);

	void addTag(int ARPageId, float startx, float starty, float height,
			float width, AsyncCallback<Integer> callback);

	void addUser(String email, String password, int publisherId,
			AsyncCallback<Integer> callback);

	void editPassword(String email, String newPassword,
			AsyncCallback<Boolean> callback);

	void editTag(String tagId, float nstartx, float nstarty, float nheight,
			float nwidth, AsyncCallback<Boolean> callback);

	void getContent(int tagId, AsyncCallback<Content[]> callback);

	void getPageImageUrl(int arPageId, AsyncCallback<String> callback);

	void getPapers(int publisherId, AsyncCallback<Paper[]> callback);

	void getTags(int arPageId, AsyncCallback<Tag[]> callback);

	void signIn(String username, String password,
			AsyncCallback<Integer[]> callback);

	void isLoggedIn(String username, String key, AsyncCallback<Boolean> callback);

	void removeARPage(int ARPageId, AsyncCallback<Boolean> callback);

	void removeContent(int contentId, AsyncCallback<Boolean> callback);

	void removeTag(int tagId, AsyncCallback<Boolean> callback);

	void setARPageImage(int arpageId, String imageUrl,
			AsyncCallback<Boolean> callback);

	void viewPage(int arPageId, String auth, AsyncCallback<PageView> callback);

	void createContent(int publisherId, String contentType, String title,
			String description, String url, AsyncCallback<Integer> callback);

	void addContentToTag(int tagId, int contentId,
			AsyncCallback<Boolean> callback);

	void getEditions(int paperId, AsyncCallback<Edition[]> callback);

	void getSections(int paperId, AsyncCallback<Section[]> callback);

	void getPaperDetails(int paperId, AsyncCallback<Paper> callback);

	void addSection(int id, String section, AsyncCallback<Integer> callback);

	void addEdition(int paperId, String edition, AsyncCallback<Integer> callback);

	void removeSection(int paperId, String section,
			AsyncCallback<Boolean> callback);

	void removeEdition(int paperId, String section,
			AsyncCallback<Boolean> callback);

	void changeDimensions(int paperId, float width, float height,
			AsyncCallback<Boolean> callback);

	void updateTagContent(int tagId, Content[] contents,
			AsyncCallback<Integer> callback);

	void viewPageJson(int arPageId, AsyncCallback<String> callback);

	void changeTagPlacement(int tagId, float x, float y, float width,
			float height, AsyncCallback<Boolean> callback);

	void incHits(int arPageId, AsyncCallback<Void> callback);

	void getHits(int arPageId, AsyncCallback<Integer> callback);

	void getHitStats(int paperId, Date startDate, Date endDate,
			AsyncCallback<SectionStats[]> callback);

}
